﻿$(function(){
	$(".title_header").click(function(){
		$(this).addClass('white1');
		$(this).siblings().removeClass('white1');
	});

	
	
	
	
})

function express_delete(express_id){
	console.log(express_id);
	layer.confirm('确定要删除吗？', {
		title: false,
		skin:'red-skin',
		shift:6,
		btn: ['删除','取消'] //按钮
	}, function(){
			
		$.ajax({  
			type : "POST",  
			url : url,
			data : {"express_id" : express_id},
			dataType: "json",		
			success : function(result) {
				if(result.code=="1"){
					window.location.reload(); 
				}
			}
			
		});
	});
}

function temp_delete(tem_id){ //删除模板
	console.log(tem_id);
	layer.confirm('确定要删除吗？', {
		title: false,
		skin:'red-skin',
		shift:6,
		btn: ['删除','取消'] //按钮
	}, function(){
			
		$.ajax({  
			type : "POST",  
			url : url,
			data : {"tem_id" : tem_id},
			dataType: "json",		
			success : function(result) {
				if(result.code=="1"){
					window.location.reload(); 
				}
			}
			
		});
	});
}

function temp_cancel(tem_id){ //停用模板
	console.log(tem_id);
	layer.confirm('确定要停用吗？', {
		title: false,
		skin:'red-skin',
		shift:6,
		btn: ['停用','取消'] //按钮
	}, function(){			
		$.ajax({  
			type : "POST",  
			url : "express_template.class.php",
			data : {"option" : "temp_cancel","tem_id" : tem_id},
			dataType: "json",		
			success : function(result) {
				if(result.code=="1"){
					window.location.reload(); 
				}
			}
			
		});
	});

}

function temp_check(tem_id){ //选择模板
	console.log(tem_id);
	layer.confirm('只能选择一个模板，确定选择此模板吗？', {
		title: false,
		skin:'red-skin',
		//shift:6,
		btn: ['确认','取消'] //按钮
	}, function(){

		$.ajax({  
			type : "POST",  
			url : url,	
			data : {"tem_id" : tem_id},
			dataType: "json",		
			success : function(result) {
				if(result.code=="1"){
					window.location.reload(); 
				}
			}
			
		});
	});
}